//
// Created by chaseaishang on 23-5-16.
//

#pragma once

enum class game_state
{
    UNBEGIN=0,
    ASKBEGIN=1,
    INGAMEING=2,
    FIRSTINGAME=3,
    NOUPDATE=4,
    GETREADY=5,
    QUIT
};
class GameData
{
public:
    struct In_gameData
    {
        char key_code;
        float x_pos;
        float deltaTime;
        bool Stuck;
    };
    static game_state unpackData(char*data,int& len,In_gameData *g_data= nullptr);
    static void packData(char*data,int& len,game_state state,In_gameData* g_data= nullptr);

};


